{extend name="admin@public/basic" /}
{block name="style"}
{/block}
{block name="cotent"}
<form class="layui-form form-width-99admin" action="">
    <br>
    <div class="layui-form-item">
        <label class="layui-form-label">登录账号</label>
        <div class="layui-input-block">
            <input type="text" autocomplete="off" readonly value="{$member.username|default=''}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">初始密码</label>
        <div class="layui-input-block">
            <input type="password" id="password" lay-verify="title" autocomplete="off" placeholder="请输入初始密码" value="" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">确认密码</label>
        <div class="layui-input-block">
            <input type="password" id="password1" lay-verify="title" autocomplete="off" placeholder="请输入确认密码" value="" class="layui-input">
        </div>
    </div>
    <input type="hidden" id="id" value="{$member.id|default=''}" class="layui-input">

    <div class="layui-form-item layui-row layui-col-xs12">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-sm" id="submitBtn">提交</button>
            <button class="layui-btn layui-btn-sm layui-btn-primary" data-close="closeOpen">取消</button>
        </div>
    </div>

</form>
{/block}

{block name="script"}
<script type="text/javascript">
    /**
     * 重置密码
     */
    $("#submitBtn").click(function () {
        var data = {
            id: $("#id").val(),
            password: $("#password").val(),
            password1: $("#password1").val(),
        };
        $.request.post('{:url("$thisRequest")}', data, function (res) {
            $.msg.success(res.msg, function () {
                $.tool.reload('open');
            })
        });
        return false;
    });

</script>
{/block}
